﻿using Microsoft.AspNetCore.Http;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TradeDataAPI.Core.Common.req
{


    /// <summary>
    /// Base class for HazardReport requests
    /// </summary>
    public class HazardReportBaseReq
    {
        public int HazardTypeId { get; set; }
        public string Photo { get; set; }
        public string Description { get; set; }
        public string DepartmentId { get; set; }
        public string Numberwork { get; set; }
        public int Status { get; set; }
        public string CreateID { get; set; }
        public string ModifyID { get; set; }

        /// <summary>
        /// List of files to upload
        /// </summary>
        public List<IFormFile> PicFile { get; set; }

    }

    public class CreateHazardReportReq : HazardReportBaseReq
    {
        public int UserId { get; set; }
    }

    public class UpdateHazardReportReq : HazardReportBaseReq
    {

        /// <summary>
        /// 审核意见
        /// </summary>
        public string Comments { get; set; }
        public string StatusName { get; set; }
        public int ReportId { get; set; }


        /// <summary>
        /// 如果没有修改 就是0
        /// </summary>
        public int HazardTypes { get; set; } = 0;

        /// <summary>
        /// 如果没有修改 就是空值
        /// </summary>
        public string DeptId { get; set; } = "";
    }


    public class BatchAutioReq
    {

        public string Status { get; set; }


        public string Comments { get; set; }


        public string Ids { get; set; }

    }


    public class GetHazardReportsReq:CommonReq
    {
        /// <summary>
        /// 状态排序 0 倒叙  1 正序
        /// </summary>
        public int StatusSort { get; set; } = 0;

        /// <summary>
        /// 提交时间排序   0 倒叙  1 正序
        /// </summary>
        public int CommitTimeSort { get; set; } = 0;


        /// <summary>
        /// 审核时间排序   0 倒叙  1 正序
        /// </summary>
        public int AuditTime { get; set; } = 0;

        /// <summary>
        /// 页大小
        /// </summary>
        public int PageSize { get; set; }

        /// <summary>
        /// 页码
        /// </summary>
        public int PageNumber { get; set; }

    }



    public class UploadImgReq
    {

        public IFormFile file { get; set; }


        public string name { get; set; }

    }



    public class AddHazardReportReq:CommonReq
    {

        /// <summary>
        /// 照片列表 base64
        /// </summary>
        public List<string> photo { get; set; }


        /// <summary>
        /// 隐患描述
        /// </summary>
        public string Description { get; set; }
        /// <summary>
        /// 隐患类型
        /// </summary>
        public int hazard_type_id { get; set; }


    }
}
